package com.jpa.element.collections.mappings.tutorial.service;

import com.jpa.element.collections.mappings.tutorial.domain.Artist;

import javax.persistence.EntityManager;

public class ArtistService {

    private EntityManager em;

    public ArtistService(EntityManager em) {
        this.em = em;
    }

    public Artist findArtist(int id) {
        return em.find(Artist.class, id);
    }
}
